package com.maya.medicalwastes.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.maya.medicalwastes.R;
import com.maya.medicalwastes.entity.CollectBean;
import com.maya.medicalwastes.util.SearchType;

import java.util.List;

/**
 * @author created by fuguoyong
 * 版本：1.0
 * 创建日期：2020-11-19 13
 * 描述：CollectListAdapter
 */
public class TadayCollectAdapter extends BaseQuickAdapter<CollectBean, BaseViewHolder> {

    public TadayCollectAdapter(int layoutResId, @Nullable List<CollectBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CollectBean item) {
        helper.setText(R.id.tv_collectHandoverPersonDepartment, item.getCollectHandoverPersonDepartment() == null ? "1111" : item.getCollectHandoverPersonDepartment()).setText(R.id.tv_type, SearchType.getWareType(item.getGarbageCategory())  == null ? "" : SearchType.getWareType(item.getGarbageCategory())).setText(R.id.tv_scan_numb, item.getGarbageId() == null ? "" : item.getGarbageId())
                  .setText(R.id.tv_numb, item.getBatchNumber() == null ? "" : item.getBatchNumber()).setText(R.id.tv_wight, item.getWeight() == null ? "" : item.getWeight())

                  .setText(R.id.tv_jiaojie, item.getCollectHandoverPerson() == null ? "--" : item.getCollectHandoverPerson()).setText(R.id.tv_collecter, item.getCollectPersonnel() == null ? "--" : item.getCollectPersonnel())

                  .setText(R.id.tv_collect_time, item.getCreateTime() == null ? "- -" : item.getCreateTime()).setText(R.id.tv_intime, item.getWarehousingTime() == null ? "- -" : item.getWarehousingTime()).setText(R.id.tv_index,helper.getLayoutPosition()+1+"");


    }
}
